package mutsumimod.cards.derivative;

import basemod.AutoAdd;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import mutsumimod.actions.BetterExhaustSpecificCardAction;
import mutsumimod.cards.BaseCard;
import mutsumimod.character.Mutsumi;
import mutsumimod.util.CardStats;

import java.util.ArrayList;

@AutoAdd.Ignore
public class CurseImagination extends BaseCard  {
    public static final String ID = makeID(CurseImagination.class.getSimpleName());
    public static final CardStats info = new CardStats(
            Mutsumi.Meta.CARD_COLOR,
            CardType.CURSE,
            CardRarity.SPECIAL,
            CardTarget.SELF,
            0
    );

    public CurseImagination() {
        super(ID, info);
        setAttr(0,0,0);
        setAttrUpg(0,0,0);
    }

    @Override
    public boolean canUse(AbstractPlayer p,AbstractMonster m){
        if(getInCopyUse()){
            return super.canUse(p,m);
        }
        return false;
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {

    }

    @Override
    public void onCopyChooseThisCard(ArrayList<AbstractCard> cards) {
        addToBot(new BetterExhaustSpecificCardAction(this));
    }


    @Override
    public AbstractCard makeCopy() { //Optional
        return new CurseImagination();
    }

    @Override
    public void updateDescription() {
        if(getInCopyUse()){
            rawDescription = cardStrings.EXTENDED_DESCRIPTION[0];
        }else{
            rawDescription = cardStrings.DESCRIPTION;
        }
        initializeDescription();
    }

    @Override
    public void upgrade(){

    }

    @Override
    public boolean canUpgrade() {
        return false;
    }
}